import * as React from 'react';

export interface IconProps {
    type: string;
    size?: number;
    color?: string;
    // className?: string;
    // title?: string;
    // onClick?: React.MouseEventHandler<any>;
    // spin?: boolean;
    // style?: React.CSSProperties;
  }

const Icon = (props: IconProps) => {
    const { type, size, color} = props;
    // const { type, className = '', spin } = props;
    // const classString = classNames({
    //   'anticon': true,
    //   'anticon-spin': !!spin || type === 'loading',
    //   [`anticon-${type}`]: true,
    // }, className);
    // return <i {...omit(props, ['type', 'spin'])} className={classString} />;
    const classString = `icon icon-${type}`;
    const style = {
      fontSize: `${size}px`,
      color: `${color}`,
    };
    return <i className={classString} style={style} />;
  };

export default Icon;
